package packed_widgets

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/widget"
)

type Button struct {
	*BaseComponent
	*widget.Button
}

func (btn *Button) ToolbarObject() fyne.CanvasObject {
	return btn.Button
}

func NewButton(text string, icon fyne.Resource, onTapped func()) *Button {
	btn := &Button{
		BaseComponent: NewBaseComponent(),
		Button:        widget.NewButtonWithIcon(text, icon, onTapped),
	}
	btn.ExtendBaseWidget(btn)
	return btn
}
